Prob_Angle Segmentation Fault or Bug?
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
7 years 3 months ago #291
by jdmoore
I think the problem might be on line 199 of move_angle.f90
I think the integer angle_to_move is being used before it has been defined. So it seg faults when angle_list is trying to use angle_to_move
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
Code runs if I peg angle_to_move = 1 at beginning of subroutine.
What needs to go here before here to define angle_to_move?
Thanks.
Josh
I think the integer angle_to_move is being used before it has been defined. So it seg faults when angle_list is trying to use angle_to_move
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
Code runs if I peg angle_to_move = 1 at beginning of subroutine.
What needs to go here before here to define angle_to_move?
Thanks.
Josh
Please Log in to join the conversation.
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
7 years 3 months ago #292
by jdmoore
Ahh, I think this is what is missing. Can you confirm?
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
Should be before line 199 of angle.f90, before
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
This would then match move_dihedral, where dihedral_to_move is chosen randomly.
Thanks.
Josh
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
Should be before line 199 of angle.f90, before
atom1 = angle_list(angle_to_move,is)%atom1
atom2 = angle_list(angle_to_move,is)%atom2
atom3 = angle_list(angle_to_move,is)%atom3
This would then match move_dihedral, where dihedral_to_move is chosen randomly.
Thanks.
Josh
Please Log in to join the conversation.
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
7 years 3 months ago #293
by jdmoore
After adding
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
I am now sometimes getting other errors related to the prob_this_theta being too low in the
6.9531649819728962E-310
This error occurred in subroutine Get_Theta_Prob on step 88.
Fatal Error. Stopping program.
However, sometimes in other examples, I get a different error
Attempted to change an angle of molecule 50 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 64.
Fatal Error. Stopping program.
I'm attaching an example using the pentane example from the Examples directory, modified for GCMC. Note I'm also sometimes getting an error with NPT, but I'm getting an error most often with GCMC with small tests
The fragments need to be regenerated with
Cassandra_V1.2/Scripts/Frag_Library_Setup//library_setup.py Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp pentane.pdb
Then run with
Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp
I compiled this with gfortran, but I'm also seeing the same errors with intel compilers.
Note if I decrease the chemical potential to say -40 kJ/mol, it does run, but shouldn't I be able to do angle moves with this chemical potential. The problem runs fine, if I don't include angle moves.
To confuse you, I've also kept the equil.inp file there which is the NPT example. Please ignore that file.
Any advice?
Thanks in advance.
Josh
! Select a angle at random
angle_to_move = INT( rranf() * nangles(is) ) + 1
I am now sometimes getting other errors related to the prob_this_theta being too low in the
6.9531649819728962E-310
This error occurred in subroutine Get_Theta_Prob on step 88.
Fatal Error. Stopping program.
However, sometimes in other examples, I get a different error
Attempted to change an angle of molecule 50 of species 3
but the molecule energy is too high
This error occurred in subroutine Angle_Distortion on step 64.
Fatal Error. Stopping program.
I'm attaching an example using the pentane example from the Examples directory, modified for GCMC. Note I'm also sometimes getting an error with NPT, but I'm getting an error most often with GCMC with small tests
The fragments need to be regenerated with
Cassandra_V1.2/Scripts/Frag_Library_Setup//library_setup.py Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp pentane.pdb
Then run with
Cassandra_V1.2/Src/cassandra_gfortran.exe equil_GCMC.inp
I compiled this with gfortran, but I'm also seeing the same errors with intel compilers.
Note if I decrease the chemical potential to say -40 kJ/mol, it does run, but shouldn't I be able to do angle moves with this chemical potential. The problem runs fine, if I don't include angle moves.
To confuse you, I've also kept the equil.inp file there which is the NPT example. Please ignore that file.
Any advice?
Thanks in advance.
Josh
Please Log in to join the conversation.
- emarin
- Offline
- Administrator
Less
More
- Posts: 42
- Karma: 2
- Thank you received: 7
- jdmoore
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 32
- Thank you received: 3
- byoo1
- Offline
- Administrator
Less
More
- Posts: 4
- Karma: 1
- Thank you received: 1
7 years 2 months ago #296
by byoo1
Hi Josh,
Thanks for finding this out. Looks like the internal coordinates for an inserted molecule were not being updated in the insertion move routine. (This should only be an issue for the angle routine.)
I will go ahead and upload the hotfix (including the one you mentioned regarding the 'angle_to_move'). There should be a new tarball uploaded onto the website later today. I'll post a comment here once it's done.
Also, let us know if you run into any other issues with the angle or dihedral routines!
-Brian
Thanks for finding this out. Looks like the internal coordinates for an inserted molecule were not being updated in the insertion move routine. (This should only be an issue for the angle routine.)
I will go ahead and upload the hotfix (including the one you mentioned regarding the 'angle_to_move'). There should be a new tarball uploaded onto the website later today. I'll post a comment here once it's done.
Also, let us know if you run into any other issues with the angle or dihedral routines!
-Brian
The following user(s) said Thank You: jdmoore
Please Log in to join the conversation.
Time to create page: 0.126 seconds